Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more Rustified version of kernel_check #862

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

squell
Copy link
Member

@squell squell commented Sep 2, 2024

The PR in #854 didn't strike me as particular elegant; and if we move to different OS's we might probably need different kernel checks as well. So this cleans up that routine.

@squell squell added the minor minor issue, PR without an issue label Sep 2, 2024
@squell squell force-pushed the update-kernel-check branch 2 times, most recently from 493c574 to 3fe10bd Compare September 3, 2024 10:03
@squell squell enabled auto-merge (rebase) September 3, 2024 10:07
@squell squell mentioned this pull request Oct 9, 2024
3 tasks
@squell squell disabled auto-merge October 22, 2024 11:50
@squell squell enabled auto-merge (rebase) October 22, 2024 11:51

#[cfg(not(target_os = "linux"))]
pub fn kernel_check(target_major: u32, target_minor: u32) -> Result<(), Error> {
// if someone managed to compile this on anything else than Linux: your luck runs out here
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have a compile_error!() inside the non-linux version of kernel_check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor minor issue, PR without an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants